package com.firemoss.atonement.messaging.events
{
	import flash.events.Event;

	public class AtonementConsumerEvent extends Event
	{
		public static const ATONEMENT_CONSUMER_CONNECT : String = "atonementConsumerConnect";
		public static const ATONEMENT_CONSUMER_DISCONNECT : String = "atonementConsumerDisconnect";
		public static const ATONEMENT_ENTITY_UPDATED_SUFFIX : String = "Updated";
		
		public static function createEntityUpdateEvent( entityName : String, id : * ) : AtonementConsumerEvent
		{
			return new AtonementConsumerEvent( entityName + ATONEMENT_ENTITY_UPDATED_SUFFIX, entityName, id );
		}
		
		public var entityName : String
		public var id : *
		
		public function AtonementConsumerEvent(type : String, entityName : String = null, id : * = null)
		{
			super( type, true )
			
			this.entityName = entityName
			this.id = id
		}
		
	}
}